widget-factory: Add non-modal popovers
authorMatthias Clasen <mclasen@redhat.com>
Mon, 22 Apr 2019 15:36:42 +0000 (15:36 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 27 Apr 2019 17:50:14 +0000 (17:50 +0000)
This makes is easy to test moving the toplevel
or repositioning the parent while the popover
is shown.

demos/widget-factory/widget-factory.ui

index 095cbdbc566d20ec655d76152565cd965f1cea2b..0bb77eac2ef29e63d5e24832fe2bd80a29ba740d 100644 (file)
@@ -2880,6 +2880,17 @@ microphone-sensitivity-medium-symbolic</property>
                                     <child>
                                       <object class="GtkNotebook">
                                         <property name="show-border">0</property>
+                                        <child type="action-end">
+                                          <object class="GtkMenuButton">
+                                            <property name="valign">center</property>
+                                            <property name="popover">notebook_info_popover2</property>
+                                            <property name="icon-name">emblem-important-symbolic</property>
+                                            <property name="relief">none</property>
+                                            <style>
+                                              <class name="circular"/>
+                                            </style>
+                                          </object>
+                                        </child>
                                         <child>
                                           <object class="GtkNotebookPage">
                                             <property name="tab-expand">1</property>
@@ -3439,8 +3450,9 @@ bad things might happen.</property>
     </widgets>
   </object>
   <object class="GtkPopover" id="notebook_info_popover">
+    <property name="modal">0</property>
     <child>
-      <object class="GtkLabel" id="notebook_info_label">
+      <object class="GtkLabel">
         <property name="label">No updates at this time</property>
         <accessibility>
           <role type="static"/>
@@ -3448,4 +3460,15 @@ bad things might happen.</property>
       </object>
     </child>
   </object>
+  <object class="GtkPopover" id="notebook_info_popover2">
+    <property name="modal">0</property>
+    <child>
+      <object class="GtkLabel">
+        <property name="label">No updates here either</property>
+        <accessibility>
+          <role type="static"/>
+        </accessibility>
+      </object>
+    </child>
+  </object>
 </interface>